<template>
  <div>
    <!-- 值是true就有,false就没有 -->
     <div :class='{box:true}'></div>
     <div :class="{big:true}"></div>
   </div>
</template>
 
<script>
export default {

  data() {
    return {};
  },

  methods: {}
};
</script>

<style scoped>
     .box{
      width: 200px;
      height: 200px;
      background-color: red;
     }
     
     .big{
      width: 300px;
      height: 300px;
      background-color: gold;
     }
     
</style>